package cn.stylefeng.guns.modular.api.controller;

import cn.stylefeng.guns.modular.ctm.dto.ResumeInformationDTO;
import cn.stylefeng.guns.modular.ctm.service.ResumeInformationService;
import cn.stylefeng.roses.core.base.controller.BaseController;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 简历信息管理
 */
@Controller
@RequestMapping("/api/resumeInformation")
@Api(tags = "简历信息")
@CrossOrigin
public class ApiResumeInformationController extends BaseController {

    @Autowired
    private ResumeInformationService resumeInformationService;
    private Logger log = LoggerFactory.getLogger(this.getClass());

//    @GetMapping(value = "/page")
//    @ApiOperation(value = "简历信息分页列表", notes = "简历信息分页列表")
//    @ResponseBody
//    public ResponseData page(Page page) {
//        return ResponseData.success(resumeInformationService.page(page));
//    }

    @GetMapping(value = "/info")
    @ApiOperation(value = "简历信息详情", notes = "简历信息详情")
    @ResponseBody
    public ResponseData getInfo() {
        return ResponseData.success(resumeInformationService.getInfo());
    }

    @PostMapping(value = "/save")
    @ApiOperation(value = "简历信息保存", notes = "简历信息保存")
    @ResponseBody
    public ResponseData save(@RequestBody ResumeInformationDTO resumeInformationDTO) {
        return ResponseData.success(resumeInformationService.save(resumeInformationDTO));
    }

}